package com.qf.edu.service.impl;

import com.qf.edu.dao.DrugsLimit;
import com.qf.edu.dao.impl.DrugsLimitImpl;
import com.qf.edu.entity.Drugs;
import com.qf.edu.service.DrugsLimitService;
import com.qf.edu.utils.PageUtils;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author:huayuzhuo
 * @email:2798866329@qq.com
 * @desc:DrugsLimitService接口的实现类
 * @datatime: 2022/6/7 16:19
 */
public class DrugsLimitServiceImpl implements DrugsLimitService {
    @Override
    public Map<String, Object> drugsMan(PageUtils pageUtils) {
        DrugsLimit drugsLimit = new DrugsLimitImpl();
        //每页数据
        List<Drugs> list = drugsLimit.drugsLimt(pageUtils);
        //药品数量
        int drugsAll = drugsLimit.getDrugsAll();
        //声明一个map泛型
        Map<String, Object> hashMap = new HashMap<>();
        hashMap.put("list",list);
        hashMap.put("drugsAll",drugsAll);

        return hashMap;
    }
}
